package cn.edu.scau.cmi.wujiaxian.exercise8;

public class RedCowForm {
	
	String formName;
	
	RedCow cow;
	
	public RedCowForm() {
	}
	
	public RedCowForm(String formName) {
		cow = new RedCow(150, 112, 5000);
		this.formName = formName;
	}
	
	public void showCowMess() {
		cow.speak();
	}

	public void speak1() {
		System.out.println("speak");
	}
	
	class RedCow {
		
		String cowName = "红牛";
		
		int height;
		
		int weight;
		
		int price;
		
		public RedCow(int height, int weight, int price) {
			this.height = height;
			this.weight = weight;
			this.price = price;
			speak1();
		}
		
		void speak() {
			System.out.println("偶是" + cowName + ",身高" + height + "cm 体重" + weight + "kg,生活在" + formName);
		}
		
	}
	
}

